<!--  -->
<template>
    <div class='flow-title' ref="flowTitle">
        <p class="hy-35J" ref="flowTitleText">{{params}}</p>
    </div>
</template>

<script>
export default {
    name: '',
    components: {},
    data() {
        return {

        };
    },
    props: ['params'],
    computed: {},
    watch: {},
    created() {

    },
    mounted() {

    },
    methods: {
        init(){
          let tl = new TimelineMax({})
          let tw1 = TweenMax.to(this.$refs.flowTitle, .3, {opacity: 1, scaleX: 1})
          let tw2 = TweenMax.to(this.$refs.flowTitleText, .3, {opacity: 1, scaleX: 1})
          let tw3 = TweenMax.to(this.$refs.flowTitleText, .3, {scrambleText: {
            text: this.params,
            chars: '_ ',
            speed: 0.3
            }})
        tl.addLabel('start')
            .add(tw1, 'start+=0')
            .add(tw2, 'start+=0.2')
            .add(tw3, 'start+=0.3')
        return tl
        }
    },
}
</script>
<style lang='scss' scoped>
//@import url(); 引入公共css类
.flow-title {
    position: absolute;
    padding: 2px 3px;
    opacity: 0;
    transform: scaleX(0);
    &::before{
        position: absolute;
        content: '';
        left: 0;
        top: 0;
        width: 5px;
        height: 24px;
        border: 1px solid #00f7fa;
        border-right: none;
    }
    &::after{
        position: absolute;
        content: '';
        right: 0;
        top: 0;
        width: 5px;
        height: 24px;
        border: 1px solid #00f7fa;
        border-left: none;
    }
    p{
        min-width: 60px;
        padding: 0 10px;
        height: 20px;
        line-height: 20px;
        color: #00f7fa;
        font-size: 14px;
        font-weight: bold;
        background: linear-gradient(to right, rgba(3, 94, 240, .8), rgba(3, 94, 240, 0));
        opacity: 0;
        transform: scaleX(0);
    }
}
</style>